<template lang="pug">
  .swiper-frame.page(v-if="isShow && imgList.length > 0")
    .wrap
      CtrlBar(@closeBar='isShow = false')
      el-carousel(:interval="4000",  height="600px")
        el-carousel-item(v-for="(item, index) in imgList", :key="index")
          img(:src="item")

</template>

<script>

import CtrlBar from '@/components/CtrlBar'
export default {
  data() {
    return {
      isShow: false,
      imgList: [],
      model: 1
    }
  },
  mounted() {
    this.$vgo.on('iframe:swiper', (obj) => {
      this.show()
      this.imgList = obj.data
      this.model = obj.modal
      this.$bar.finish()
    })
  },
  methods: {
    show() {
      this.isShow = true
    }
  },
  components: {
    CtrlBar
  }
}
</script>

<style lang="stylus">
.el-carousel__arrow
  border 1px solid #fff
  text-shadow 0 0 10px #000
</style>
